<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

<t:wrapper>
    <jsp:body> 
		<c:choose>
			<c:when test="${empty subjects}">
				You have no lesson.
			</c:when>
			<c:otherwise>
				<ul>
					<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?min=-1">Etudiants absents à tous les cours</a></li>
					<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?present=1">Etudiants absents à aucun cours</a></li>
				</ul>
				<ul>
					<c:forEach var="subject" items="${subjects}">
						<li><a href="${pageContext.request.contextPath}/User/Teacher/LessonForSubject?subject=${subject.id}">${subject.name}</a> (Cliquez pour signaler des absences)
							<ul>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&min=1">Etudiants absents au moins une fois</a></li>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&min=3">Etudiants absents plus de 3 fois</a></li>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&min=3&type=TD">Etudiants absents plus de 3 fois en TD</a></li>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&min=3&type=TD&nonJustify=1">Etudiants absents plus de 3 fois en TD, SANS JUSTIFICATION</a></li>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&min=3&type=TP">Etudiants absents plus de 3 fois en TP</a></li>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&min=3&type=TP&nonJustify=1">Etudiants absents plus de 3 fois en TP, SANS JUSTIFICATION</a></li>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&present=1">Etudiants jamais absents</a></li>
								<li><a href="${pageContext.request.contextPath}/User/Teacher/Absences?subject=${subject.id}&min=-1">Etudiants toujours absents</a></li>
							</ul>
						</li>
					</c:forEach>
				</ul>
			</c:otherwise>
		</c:choose>    
	</jsp:body>
</t:wrapper>